MediaDevices

An engine service that allows accessing all the available media input devices.

Functions

Link copied to clipboard
inline fun <C : Callback> Advisable<in C>.callback(): C?
inline fun <C : Callback> Advisable<in C>.callback(): C?

Returns the currently registered callback of type C, if any.

Link copied to clipboard
abstract fun engine(): Engine
Returns the engine of this service.
Link copied to clipboard
abstract fun <C : P?> get(callbackClass: Class<C>): Optional<C>
Returns an Optional that contains the callback of the given type or an empty Optional if there is no registered callback with the given type.
Link copied to clipboard
abstract fun list(type: MediaDeviceType): List<MediaDevice>
Returns an immutable list of the details about all the available media input devices of the given type or an empty collection if there are no devices of the given type.
Link copied to clipboard
inline fun <C : Callback> Advisable<in C>.register(callback: C): C?
inline fun <C : Callback> Advisable<in C>.register(callback: C): C?

Registers the given callback in this Advisable.

Link copied to clipboard
abstract fun <C : P?> remove(callbackClass: Class<C>): C
Removes a particular service callback.
Link copied to clipboard
inline fun <C : Callback> Advisable<in C>.removeCallback(): C?
inline fun <C : Callback> Advisable<in C>.removeCallback(): C?

Removes a callback of type C from this Advisable, if any.

Link copied to clipboard
abstract fun <C : P?> set(callbackClass: Class<C>, callback: C): C
Sets a particular service callback.